﻿namespace Sidvall.AuthorizationManager.Data.Entity.Entities
{
    public partial class AuthorizationScopeResourceActionClaim : global::Sidvall.Data.DataRowBase, global::Sidvall.AuthorizationManager.Data.IAuthorizationScopeResourceActionClaim
    {
        #region Public Members

        #region AuthorizationScopeResourceActionClaimId

        private long _AuthorizationScopeResourceActionClaimId;
        public long AuthorizationScopeResourceActionClaimId
        { 
            get
            {
                return _AuthorizationScopeResourceActionClaimId;
            }
            set
            {
                _AuthorizationScopeResourceActionClaimId = value;
            }
        }

        #endregion
        #region AuthorizationScopeResourceActionId

        private long _AuthorizationScopeResourceActionId;
        public long AuthorizationScopeResourceActionId
        { 
            get
            {
                return _AuthorizationScopeResourceActionId;
            }
            set
            {
                _AuthorizationScopeResourceActionId = value;
            }
        }

        #endregion
        #region ClaimType

        private string _ClaimType;
        public string ClaimType
        { 
            get
            {
                return _ClaimType;
            }
            set
            {
                _ClaimType = value;
            }
        }

        #endregion
        #region ComparisonOperator

        private int _ComparisonOperator;
        public int ComparisonOperator
        { 
            get
            {
                return _ComparisonOperator;
            }
            set
            {
                _ComparisonOperator = value;
            }
        }

        #endregion
        #region IsEnabled

        private bool _IsEnabled;
        public bool IsEnabled
        { 
            get
            {
                return _IsEnabled;
            }
            set
            {
                _IsEnabled = value;
            }
        }

        #endregion
        #region Value

        private string _Value;
        public string Value
        { 
            get
            {
                return _Value;
            }
            set
            {
                _Value = value;
            }
        }

        #endregion
        
        public virtual Sidvall.AuthorizationManager.Data.Entity.Entities.AuthorizationScopeResourceAction AuthorizationScopeResourceAction { get; set; }
        
        #region DataRowContextStorageKey

        protected override string DataRowContextStorageKey
        {
            get
            {
                return global::Sidvall.AuthorizationManager.Data.Entity.SystemContext.Current.EntityFacade.AuthorizationScopeResourceActionClaimManager.GetKey(this);
            }
        }

        #endregion
        #region DataRowStateIsDirty

        protected override bool DataRowStateIsDirty
        {
            get
            {
                return global::Sidvall.AuthorizationManager.Data.Entity.SystemContext.Current.EntityFacade.AuthorizationScopeResourceActionClaimManager.DataRowStateIsDirty(this);
            }
        }

        #endregion

        #region IAuthorizationScopeResourceActionClaim Members

        System.Nullable<long> global::Sidvall.AuthorizationManager.Data.IAuthorizationScopeResourceActionClaim.AuthorizationScopeResourceActionClaimId
        {
            get
            {
                return this._AuthorizationScopeResourceActionClaimId;
            }
            set
            {
                if (value != null)
                    this.AuthorizationScopeResourceActionClaimId = value.Value;
            }
        }
        long global::Sidvall.AuthorizationManager.Data.IAuthorizationScopeResourceActionClaim.AuthorizationScopeResourceActionId
        {
            get
            {
                return this._AuthorizationScopeResourceActionId;
            }
            set
            {
                this.AuthorizationScopeResourceActionId = value;
            }
        }
        string global::Sidvall.AuthorizationManager.Data.IAuthorizationScopeResourceActionClaim.ClaimType
        {
            get
            {
                return this._ClaimType;
            }
            set
            {
                this.ClaimType = value;
            }
        }
        global::Sidvall.Data.ComparisonOperator global::Sidvall.AuthorizationManager.Data.IAuthorizationScopeResourceActionClaim.ComparisonOperator
        {
            get
            {
                return (global::Sidvall.Data.ComparisonOperator)this._ComparisonOperator;
            }
            set
            {
                this.ComparisonOperator = (int)value;
            }
        }
        bool global::Sidvall.AuthorizationManager.Data.IAuthorizationScopeResourceActionClaim.IsEnabled
        {
            get
            {
                return this._IsEnabled;
            }
            set
            {
                this.IsEnabled = value;
            }
        }
        string global::Sidvall.AuthorizationManager.Data.IAuthorizationScopeResourceActionClaim.Value
        {
            get
            {
                return this._Value;
            }
            set
            {
                this.Value = value;
            }
        }
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
        IAuthorizationScopeResourceAction global::Sidvall.AuthorizationManager.Data.IAuthorizationScopeResourceActionClaim.AuthorizationScopeResourceAction
        {
            get
            {
                return this.AuthorizationScopeResourceAction;
            }
            set
            {
                this.AuthorizationScopeResourceAction = value as AuthorizationScopeResourceAction;
            }
        }

        #endregion

        #endregion
        #region Constructors

        public AuthorizationScopeResourceActionClaim() : this(false, null, null)
        {
        }
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
        public AuthorizationScopeResourceActionClaim(bool initializeChildren, Sidvall.Data.IDataRowContextProvider context, Sidvall.Data.DataRowState? dataRowState)
        {
            if ((context != null) || (dataRowState != null))
                SetDataRowContext(context, dataRowState);
            if (initializeChildren)
            {
            }
        }

        #endregion
    }
}